﻿using System;
using System.ServiceModel;
using ExplorerService.Common.DataContracts;

namespace ExplorerService.Common.ServiceContracts
{
    /// <summary>
    /// Callback contract for IApplicationMonitorService
    /// </summary>
    [ServiceContract]
    public interface IApplicationMonitorServiceCallback
    {
        /// <summary>
        /// Triggered when an application session is started
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void SessionStarted(Guid applicationSessionId, ApplicationInformation applicationInformation);

        /// <summary>
        /// Triggered when an application session is locked by an explorer instance
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void SessionLocked(Guid applicationSessionId, bool lockedByCurrentClient);


        /// <summary>
        /// Triggered when an application session is unlocked
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void SessionUnlocked(Guid applicationSessionId);

        /// <summary>
        /// Triggered when an application session has ended
        /// </summary>
        [OperationContract(IsOneWay = true)]
        void SessionEnded(Guid applicationSessionId);
    }
}